<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>deptList</title>
    <script src="jquery-1.8.3.js"></script>
</head>
<body>
    <form action="/selectDeptById.do">
        <input type="text" name="bumentableid" placeholder="通过id查询">[[${bumenTableid}]]</input>
        <input type="submit" value="提交"/>
    </form>
    <script>
        [[${msg}]]
    </script>
    <table border="1">
        <tr>
            <td>部门Id</td>
            <td>部门名</td>
            <td>部门地址</td>
            <td>部门创立时间</td>
            <td>操作</td>
            <td>操作</td>
            <td>操作</td>
        </tr>
            <tr th:each="s:${deptList}">
                    <td th:text="${s.getBumentableid()}"></td>
                    <td th:text="${s.getBumentablename()}"></td>
                    <td th:text="${s.getBumentableaddress()}"></td>
                    <td th:text="${#dates.format(s.getCreateTime(),'yyyy-MM-dd hh:mm:ss')}"></td>
<!--                    <td><button value="添加" id="add">添加</button></td>-->
                <td><a th:href="@{'/Dept/addDept.html'}">添加</a></td>
                <!--                    <td><a th:href="@{'/selectForedit/'+${s.getBumentableid()}}">修改</a></td>-->
                    <td><a th:href="@{'/selectForedit?bumentableid='+${s.getBumentableid()}}">修改</a></td>
                    <td><a th:href="@{'/deleteById?bumentableid='+${s.getBumentableid()}}" onclick="return confirm('删吗！')">删除</a></td>
            </tr>
    </table>

<script type="text/javascript">
    // $("#add").click(function () {
    //     window.location.href="/Dept/addDept.html";
    // });
</script>
</body>
</html>